#!/usr/bin/perl
#Created by James Rosten
#Takes a file, arg one, and converts tabs to 4 spaces, in a second file, arg two

use strict;
die "Not enough arguments or too many.\n" unless @ARGV eq 2;

open FILE, $ARGV[0] or die "$!";
my @LINES = <FILE>;
close FILE;
foreach my $lines (@LINES)
{
   $lines =~ s/\t/    /gx;
}
open FILE, ">>$ARGV[1]" or die "$!";
print FILE @LINES;
close FILE;